import React from 'react';
import Loadable from "react-loadable";
import Loading from '@/components/Loading';

export default (path) => {
  return Loadable({
    loader: () => import('@/' + path),
    loading: (props) => <Loading spinning={props.isLoading} fullScreen={false} {...props}/>,
    delay: 200,
    timeout: 10000,
  })
}